'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.post('/root/siteManage/queryConfig', controller.heller.site.queryConfig);
  router.post('/root/siteManage/queryList', controller.heller.site.querySiteList);
  router.post('/root/siteManage/save', controller.heller.site.saveSite);
  router.post('/root/siteManage/querySiteMenu', controller.heller.site.querySiteMenu);
  router.post('/root/siteManage/saveSiteMenu', controller.heller.site.saveSiteMenu);
  router.post('/root/siteManage/findSiteMenu', controller.heller.site.findSiteMenu);
  router.post('/root/materialManage/queryList', controller.heller.material.queryList);
  router.post('/root/materialManage/save', controller.heller.material.save);

  router.post('/root/apiManage/queryProjectList', controller.heller.api.queryProjectList);
  router.post('/root/apiManage/queryDataSource', controller.heller.api.queryDataSource);
  router.post('/root/apiManage/saveProject', controller.heller.api.saveProject);
  router.post('/root/apiManage/saveDataSource', controller.heller.api.saveDataSource);
  router.post('/root/apiManage/createDataSource', controller.heller.api.createDataSource);
  router.post('/root/apiManage/createApi', controller.heller.api.createApi);
  router.post('/root/apiManage/saveApi', controller.heller.api.saveApi);
  router.post('/root/apiManage/queryApi', controller.heller.api.queryApi);
  router.post('/root/apiManage/saveApiGroup', controller.heller.api.saveApiGroup);
  router.post('/root/apiManage/queryApiGroup', controller.heller.api.queryApiGroup);
  router.get('/root/apiManage/findApi', controller.heller.api.findApi);
  
  
  
  router.all('/*', controller.core.adapter);
  // 全局

  // router.get('/monitor/event/runtime/r.gif', controller.monitor.event.runtime.r);
};
